home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Install WebTV 1.1 (5.3.98)
- ;
- ; WebTV webcam viewer, by Troels Walsted Hansen <troels@stud.cs.uit.no>
- ; Copyright Ultima Thule Software © 1998, All Rights Reserved.
- ;
- ; Installer script for WebTV.
-
- (set #exitmsg "\n\nThank you for installing WebTV.\n\nRemember to register if you use it for more than 30 days.")
-
- ; Welcome screen
-
- (welcome "\nThis installer script will install WebTV.\nThe ultimate webcam viewer")
-
- ; Check the environment
-
- (if (< (/ @installer-version 65536) 43)
- (abort "The WebTV installation script needs Installer\n"
- "version 43 or higher. It is available from Aminet.")
- )
-
- (if (< (/ (getversion) 65536) 39)
- (abort "WebTV needs AmigaOS 3.0 or higher.\n")
- )
-
- ; Ask for destination directory
-
- (set #destdir
- (askdir
- (prompt "Select destination directory. A directory called \"WebTV\" will be created here.")
- (help @askdir-help)
- (default @default-dest)
- )
- )
- (set @default-dest (tackon #destdir "WebTV"))
-
- ; Create installation directory and copy icon for it
-
- (makedir
- @default-dest
- )
-
- (copyfiles
- (source "/WebTV.info")
- (dest #destdir)
- )
-
- ; Copy files
-
- (copyfiles
- (prompt "The following files will be installed:")
- (help @copyfiles-help)
- (source "")
- (choices "WebTV" "WebTV.guide" "Registration" "Register" "DockBrushes")
- (dest @default-dest)
- (confirm)
- (infos)
- )
-
- ; Ask which sites to install
-
- (set #sitecats
- (askoptions
- (prompt "Select which catogories of sites you'd like installed:")
- (help "WebTV comes with a list of web camera sites to get you started. "
- "Hundreds of more cameras can be found on the world wide web.\n\n"
- "The default list is catagorized so you easily can select which "
- "camera sites to install.\n\n"
- "Adult/Explicit - streaming webcams of explicit adult nature.\n"
- "Adult/Women - webcams which occasionally show nudity.\n"
- "Pubs and bars - various pubs and bars.\n"
- "TV Online - 24 German TV channels updated every second.\n"
- "Weather - various weather observing cameras.\n"
- "Misc - cams which don't fit in any of the other catagories.\n")
- (choices "pAdult/Explicit" "Adult/Women" "Pubs and bars" "TV Online" "Weather" "Misc")
- (default 60)
- )
- )
-
- (if
- (= #sitecats 0)
-
- (exit #exitmsg)
- )
-
- ; Create sitefile from the chosen catagories
-
- (set #newsitefile "WebTV.sites")
-
- (delete #newsitefile)
-
- (if
- (bitand #sitecats 3)
-
- (textfile
- (append "GroupOpen: Adult\n")
- (dest #newsitefile)
- )
- )
-
- (if
- (bitand #sitecats 1)
-
- (textfile
- (include #newsitefile)
- (include "WebTV-Explicit.sites")
- (dest #newsitefile)
- )
- )
-
- (if
- (bitand #sitecats 2)
-
- (textfile
- (include #newsitefile)
- (include "WebTV-Women.sites")
- (dest #newsitefile)
- )
- )
-
- (if
- (bitand #sitecats 3)
-
- (textfile
- (include #newsitefile)
- (append "GroupEnd\n")
- (dest #newsitefile)
- )
- )
-
- (if
- (bitand #sitecats 4)
-
- (textfile
- (include #newsitefile)
- (include "WebTV-Pubs&bars.sites")
- (dest #newsitefile)
- )
- )
-
- (if
- (bitand #sitecats 8)
-
- (textfile
- (include #newsitefile)
- (include "WebTV-TVOnline.sites")
- (dest #newsitefile)
- )
- )
-
- (if
- (bitand #sitecats 16)
-
- (textfile
- (include #newsitefile)
- (include "WebTV-Weather.sites")
- (dest #newsitefile)
- )
- )
-
- (if
- (bitand #sitecats 32)
-
- (textfile
- (include #newsitefile)
- (include "WebTV-Misc.sites")
- (dest #newsitefile)
- )
- )
-
- ; Check for prior existance of sitefile
-
- (set #oldsitefile (tackon @default-dest "WebTV.sites"))
-
- (if
- (exists #oldsitefile)
-
- (set #sitefilechoice
- (askchoice
- (prompt "You have a web camera site configuration file called WebTV.sites already.")
- (help "Overwriting should be safe if you haven't configured any cameras of your own. Appending may create duplicate entries.")
- (choices "pOverwrite old with new file" "Append new file to old one" "Put old sites into \"Old sites\" group" "Skip copying new file")
- (default 2)
- )
- )
-
- (set #sitefilechoice 0)
- )
-
- ; Overwrite
-
- (if
- (= #sitefilechoice 0)
-
- (copyfiles
- (source #newsitefile)
- (dest @default-dest)
- ; (optional force)
- )
- )
-
- ; Append
-
- (if
- (= #sitefilechoice 1)
-
- (textfile
- (include #oldsitefile)
- (include #newsitefile)
- (dest #oldsitefile)
- )
- )
-
- ; Old sites into group
-
- (if
- (= #sitefilechoice 2)
-
- (textfile
- (append "GroupClosed: Old sites\n")
- (include #oldsitefile)
- (append "GroupEnd\n")
- (include #newsitefile)
- (dest #oldsitefile)
- )
- )
-
- ; Exit
-
- (exit #exitmsg)
-